window.on('update', (event, msg) => {
	console.log(msg);
	//window.send('toDownload');
});
window.on('progress', (event, msg) => {
	console.log('progress: ', msg);
});
window.on('downloaded', (event, msg) => {
	console.log('finish：', msg);
});
window.on('message', (event, msg) => {
	console.log('message', msg, event);
});
setTimeout(function () {
	window.send('domReady', '页面已准备好了')
	window.send('HtmlReady', '页面已准备好了')
}, 1000);


document.querySelector('#update').addEventListener('click', () => {
	window.invoke('check-update')
		.then(res => console.log('check-update', res))
		.catch(err => console.warn('check-update', err));
	window.send('check-update')
})